<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input type="hidden" name="row[id]" value="{$row['id']}">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('学校/园区')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="form-inline" data-toggle="cxselect" data-selects="school,garden">
                <select class="form-control school" name="school_id" data-url="school/cxSelect">
                    <option value="{$row.school_id}"></option>
                </select>
                <select class="form-control garden" name="row[garden_id]" data-url="garden/cxSelect" data-query-name="school_id">
                    <option value="{$row.garden_id}"></option>
                </select>
            </div>
        </div>
    </div>

    <div class="form-group">
        <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('Number')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-number" class="form-control" name="row[number]" type="text" value="{$row.number|htmlentities}" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label for="c-title" class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-title" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label for="c-type" class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[type]', $typeData, $row['type'], ['class'=>'form-control selectpicker', 'data-rule'=>'required'])}
        </div>
    </div>

    <div class="form-group">
        <label for="c-floor" class="control-label col-xs-12 col-sm-2">{:__('Floor')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-floor" class="form-control" name="row[floor]" type="text" value="{$row.floor|htmlentities}" data-rule="required">
        </div>
    </div>

    <div class="form-group">
        <label for="c-floor-room-count" class="control-label col-xs-12 col-sm-2">{:__('Floor Room Count')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-floor-room-count" class="form-control" name="row[floor_room_count]" type="text" value="{$row.floor_room_count|htmlentities}" data-rule="required">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
